<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>登录页面</title>
		<script src="jquery/jquery.min.js"></script>
		<link rel="stylesheet" href="css/bootstrap.min.css"/>
	</head>
	<body>
		<div class="container" style="width: 400px; margin-top: 100px;">
		<fieldset>
			<legend>登录</legend>
			<div class="form-group">
				<label for="username">用户名：</label>
				<input class="form-control"  autocomplete="off"
				type="text" name="username" id="username" 
				placeholder="请输入用户名"/>
			</div>
			<div class="form-group">
				<label  for="password">密码：</label>
				<input class="form-control"  type="password" name="password" id="password"  placeholder="请输入密码"/>
			</div>
			<div class="form-group">
				<button id="btnsave" class="btn btn-primary" >保存</button>
				<button id="btnclear" class="btn btn-danger">取消</button>
			</div>
		</fieldset>
		</div>
	</body>
	<script >
		// function save(){
		// console.log( $("#username".val()) )
		// console.log( $("password").val()) )
		// }
		// function cancel(){
		// 	$("#username").val('')
		// 	$("#password").val("")
		// }
		
		$("#btnsave").click(function(){
		var username=$("#username").val()
		var password=$("#password").val()
		console.log(username+","+password)
		})
		
		$("#btnclear").click(function(){
			$("#username").val('')
			$("#password").val("")
			
			
		})
	</script>
</html>